package sdk.pay.model;

import android.text.TextUtils;

import org.json.JSONException;
import org.json.JSONObject;

import java.io.Serializable;

/**
 * Created by Steven on 2016/8/30 0030.
 */
public final class TokenParam implements Serializable {
    private String p1_usercode;
    private String p2_order;
    private String p3_money;
    private String p4_returnurl;
    private String p5_notifyurl;
    private String p6_ordertime;
    private String p7_sign;
    private String p8_signtype;
    private String p9_paymethod = "SDK";
    private String p10_paychannelnum;
    private String p11_cardtype;
    private String p12_channel;
    private String p13_orderfailertime;
    private String p14_customname;
    private String p15_customcontacttype;
    private String p16_customcontact;
    private String p17_customip;
    private String p18_product;
    private String p19_productcat;
    private String p20_productnum;
    private String p21_pdesc;
    private String p22_version;
    private String p23_charset;
    private String p24_remark;
    private String p25_terminal;
    private String p26_iswappay;
    private String p27_phonecharacter;

    public void setP1_usercode(String p1_usercode) {
        this.p1_usercode = p1_usercode;
    }

    public void setP2_order(String p2_order) {
        this.p2_order = p2_order;
    }

    public void setP3_money(String p3_money) {
        this.p3_money = p3_money;
    }

    public void setP4_returnurl(String p4_returnurl) {
        this.p4_returnurl = p4_returnurl;
    }

    public void setP5_notifyurl(String p5_notifyurl) {
        this.p5_notifyurl = p5_notifyurl;
    }

    public void setP6_ordertime(String p6_ordertime) {
        this.p6_ordertime = p6_ordertime;
    }

    public void setP8_signtype(String p8_signtype) {
        this.p8_signtype = p8_signtype;
    }

    public void setP10_paychannelnum(String p10_paychannelnum) {
        this.p10_paychannelnum = p10_paychannelnum;
    }

    public void setP11_cardtype(String p11_cardtype) {
        this.p11_cardtype = p11_cardtype;
    }

    public void setP12_channel(String p12_channel) {
        this.p12_channel = p12_channel;
    }

    public void setP13_orderfailertime(String p13_orderfailertime) {
        this.p13_orderfailertime = p13_orderfailertime;
    }

    public void setP14_customname(String p14_customname) {
        this.p14_customname = p14_customname;
    }

    public void setP15_customcontacttype(String p15_customcontacttype) {
        this.p15_customcontacttype = p15_customcontacttype;
    }

    public void setP16_customcontact(String p16_customcontact) {
        this.p16_customcontact = p16_customcontact;
    }

    public void setP17_customip(String p17_customip) {
        this.p17_customip = p17_customip;
    }

    public void setP18_product(String p18_product) {
        this.p18_product = p18_product;
    }

    public void setP19_productcat(String p19_productcat) {
        this.p19_productcat = p19_productcat;
    }

    public void setP20_productnum(String p20_productnum) {
        this.p20_productnum = p20_productnum;
    }

    public void setP21_pdesc(String p21_pdesc) {
        this.p21_pdesc = p21_pdesc;
    }

    public void setP22_version(String p22_version) {
        this.p22_version = p22_version;
    }

    public void setP23_charset(String p23_charset) {
        this.p23_charset = p23_charset;
    }

    public void setP24_remark(String p24_remark) {
        this.p24_remark = p24_remark;
    }

    public void setP25_terminal(String p25_terminal) {
        this.p25_terminal = p25_terminal;
    }

    public void setP26_iswappay(String p26_iswappay) {
        this.p26_iswappay = p26_iswappay;
    }

    public void setP27_phonecharacter(String p27_phonecharacter) {
        this.p27_phonecharacter = p27_phonecharacter;
    }

    public String getP1_usercode() {
        return p1_usercode;
    }

    public String getP2_order() {
        return p2_order;
    }

    public String getP3_money() {
        return p3_money;
    }

    public String getP4_returnurl() {
        return p4_returnurl;
    }

    public String getP5_notifyurl() {
        return p5_notifyurl;
    }

    public String getP6_ordertime() {
        return p6_ordertime;
    }

    public String getP8_signtype() {
        return p8_signtype;
    }

    public String getP9_paymethod() {
        return p9_paymethod;
    }

    public String getP10_paychannelnum() {
        return p10_paychannelnum;
    }

    public String getP11_cardtype() {
        return p11_cardtype;
    }

    public String getP12_channel() {
        return p12_channel;
    }

    public String getP13_orderfailertime() {
        return p13_orderfailertime;
    }

    public String getP14_customname() {
        return p14_customname;
    }

    public String getP15_customcontacttype() {
        return p15_customcontacttype;
    }

    public String getP16_customcontact() {
        return p16_customcontact;
    }

    public String getP17_customip() {
        return p17_customip;
    }

    public String getP18_product() {
        return p18_product;
    }

    public String getP19_productcat() {
        return p19_productcat;
    }

    public String getP20_productnum() {
        return p20_productnum;
    }

    public String getP21_pdesc() {
        return p21_pdesc;
    }

    public String getP22_version() {
        return p22_version;
    }

    public String getP23_charset() {
        return p23_charset;
    }

    public String getP24_remark() {
        return p24_remark;
    }

    public String getP25_terminal() {
        return p25_terminal;
    }

    public String getP26_iswappay() {
        return p26_iswappay;
    }

    public String getP27_phonecharacter() {
        return p27_phonecharacter;
    }

    public String getP7_sign() {
        return p7_sign;
    }

    public void setP7_sign(String p7_sign) {
        this.p7_sign = p7_sign;
    }

    @Override
    public String toString() {
        return "TokenParam{" +
                "p1_usercode='" + p1_usercode + '\'' +
                ", p2_order='" + p2_order + '\'' +
                ", p3_money='" + p3_money + '\'' +
                ", p4_returnurl='" + p4_returnurl + '\'' +
                ", p5_notifyurl='" + p5_notifyurl + '\'' +
                ", p6_ordertime='" + p6_ordertime + '\'' +
                ", p7_sign='" + p7_sign + '\'' +
                ", p8_signtype='" + p8_signtype + '\'' +
                ", p9_paymethod='" + p9_paymethod + '\'' +
                ", p10_paychannelnum='" + p10_paychannelnum + '\'' +
                ", p11_cardtype='" + p11_cardtype + '\'' +
                ", p12_channel='" + p12_channel + '\'' +
                ", p13_orderfailertime='" + p13_orderfailertime + '\'' +
                ", p14_customname='" + p14_customname + '\'' +
                ", p15_customcontacttype='" + p15_customcontacttype + '\'' +
                ", p16_customcontact='" + p16_customcontact + '\'' +
                ", p17_customip='" + p17_customip + '\'' +
                ", p18_product='" + p18_product + '\'' +
                ", p19_productcat='" + p19_productcat + '\'' +
                ", p20_productnum='" + p20_productnum + '\'' +
                ", p21_pdesc='" + p21_pdesc + '\'' +
                ", p22_version='" + p22_version + '\'' +
                ", p23_charset='" + p23_charset + '\'' +
                ", p24_remark='" + p24_remark + '\'' +
                ", p25_terminal='" + p25_terminal + '\'' +
                ", p26_iswappay='" + p26_iswappay + '\'' +
                ", p27_phonecharacter='" + p27_phonecharacter + '\'' +
                '}';
    }

    public JSONObject getTokenParams() throws JSONException {
        JSONObject object = new JSONObject();
        if (!TextUtils.isEmpty(p1_usercode))
            object.put("p1_usercode", p1_usercode);
        if (!TextUtils.isEmpty(p2_order))
            object.put("p2_order", p2_order);
        if (!TextUtils.isEmpty(p3_money))
            object.put("p3_money", p3_money);
        if (!TextUtils.isEmpty(p4_returnurl))
            object.put("p4_returnurl", p4_returnurl);
        if (!TextUtils.isEmpty(p5_notifyurl))
            object.put("p5_notifyurl", p5_notifyurl);
        if (!TextUtils.isEmpty(p6_ordertime))
            object.put("p6_ordertime", p6_ordertime);
        if (!TextUtils.isEmpty(p7_sign))
            object.put("p7_sign", p7_sign);
        if (!TextUtils.isEmpty(p8_signtype))
            object.put("p8_signtype", p8_signtype);
        if (!TextUtils.isEmpty(p9_paymethod))
            object.put("p9_paymethod", p9_paymethod);
        if (!TextUtils.isEmpty(p10_paychannelnum))
            object.put("p10_paychannelnum", p10_paychannelnum);
        if (!TextUtils.isEmpty(p11_cardtype))
            object.put("p11_cardtype", p11_cardtype);
        if (!TextUtils.isEmpty(p12_channel))
            object.put("p12_channel", p12_channel);
        if (!TextUtils.isEmpty(p13_orderfailertime))
            object.put("p13_orderfailertime", p13_orderfailertime);
        if (!TextUtils.isEmpty(p14_customname))
            object.put("p14_customname", p14_customname);
        if (!TextUtils.isEmpty(p15_customcontacttype))
            object.put("p15_customcontacttype", p15_customcontacttype);
        if (!TextUtils.isEmpty(p16_customcontact))
            object.put("p16_customcontact", p16_customcontact);
        if (!TextUtils.isEmpty(p17_customip))
            object.put("p17_customip", p17_customip);
        if (!TextUtils.isEmpty(p18_product))
            object.put("p18_product", p18_product);
        if (!TextUtils.isEmpty(p19_productcat))
            object.put("p19_productcat", p19_productcat);
        if (!TextUtils.isEmpty(p20_productnum))
            object.put("p20_productnum", p20_productnum);
        if (!TextUtils.isEmpty(p21_pdesc))
            object.put("p21_pdesc", p21_pdesc);
        if (!TextUtils.isEmpty(p22_version))
            object.put("p22_version", p22_version);
        if (!TextUtils.isEmpty(p23_charset))
            object.put("p23_charset", p23_charset);
        if (!TextUtils.isEmpty(p24_remark))
            object.put("p24_remark", p24_remark);
        if (!TextUtils.isEmpty(p25_terminal))
            object.put("p25_terminal", p25_terminal);
        if (!TextUtils.isEmpty(p26_iswappay))
            object.put("p26_iswappay", p26_iswappay);
        if (!TextUtils.isEmpty(p27_phonecharacter))
            object.put("p27_phonecharacter", p27_phonecharacter);
        return object;

    }
}
